package IO流;


import 算法.NiuKe.ListNode;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;

public class System_In {
    public static void main(String[] args) {
        try {
            Class aClass = Class.forName("算法.NiuKe.ListNode");
//            System.out.println(aClass.getName());
//            ListNode o = (ListNode) aClass.newInstance();
//            System.out.println(o.val);
            Constructor constructor = aClass.getConstructor();
            ListNode o1 = (ListNode) constructor.newInstance();
            System.out.println(o1.val);

        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        } catch (InstantiationException e) {
            e.printStackTrace();
        } catch (NoSuchMethodException e) {
            e.printStackTrace();
        } catch (InvocationTargetException e) {
            e.printStackTrace();
        }

}

}
